from rest_framework import serializers
from .models import order, record


class recordSerializer(serializers.ModelSerializer):

    class Meta:
        model = record
        fields = '__all__'


class orderSerializer(serializers.ModelSerializer):
    orderRecord = recordSerializer(many=True, read_only=True)

    class Meta:
        model = order
        fields = '__all__'
